home *** CD-ROM | disk | FTP | other *** search
- property whichevent, EventToSend
-
- on getPropertyDescriptionList
- set description to [:]
- addProp(description, #whichevent, [#default: #mouseUp, #format: #symbol, #comment: "On Which Event:", #range: [#mouseUp, #mouseDown, #enterFrame, #exitFrame]])
- addProp(description, #EventToSend, [#default: #generic_event, #format: #symbol, #comment: "Event To Send:"])
- return description
- end
-
- on getBehaviorDescription
- return "Send an event to all sprites"
- end
-
- on getAssocMembers
- set myPropList to []
- return myPropList
- end
-
- on do_it me
- sendAllSprites(the EventToSend of me)
- end
-
- on mouseUp me
- if the whichevent of me = #mouseUp then
- do_it(me)
- end if
- end
-
- on mouseDown me
- if the whichevent of me = #mouseDown then
- do_it(me)
- end if
- end
-
- on enterFrame me
- if the whichevent of me = #enterFrame then
- do_it(me)
- end if
- end
-
- on exitFrame me
- if the whichevent of me = #exitFrame then
- do_it(me)
- end if
- end
-